<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>02-float-rule_01</title>
    <style>
        .container {
            width: 400px;
            height: 400px;
            border: 1px solid #000;
        }

        .box1 {
            width: 100px;
            height: 100px;
            background-color: #f00;
            float: left;
        }

        .box2 {
            width: 200px;
            height: 200px;
            background-color: #ff0;
        }

        img {
            height: 20px;
        }
        
        span {
            background-color: #0f0;
        }

        strong {
            background-color: #00f;
            display: inline-block;
            height: 20px;
        }
    </style>
</head>
<body>

<!--
浮动元素不能与行内级内容层叠，行内级内容将会被浮动元素推出
比如行内级元素、inline-block元素、块级元素的文字内容
-->

<div class="container">
    <div class="box1">box1</div>
    <div class="box2">
        <img src="images/imax.png" alt="">
        <strong>strong</strong>
        <span>span</span>
        box2 box2 box2 box2
        box2 box2 box2 box2
        box2 box2 box2 box2
        box2 box2 box2 box2
        box2 box2 box2 box2
    </div>
</div>

</body>
</html>